import { ApiProperty } from '@nestjs/swagger';
import { IsOptional, IsNotEmpty } from 'class-validator';

export class ListArticleColumnDto {
  @IsOptional()
  @ApiProperty({
    description: '文章标题',
    example: '文章标题',
  })
  articleTitle: string;

  @ApiProperty({ description: '页码', example: 1 })
  @IsNotEmpty({ message: 'pageNum不能为空' })
  pageNum: number = 1;

  @ApiProperty({ description: '每页查询数量', example: 10 })
  @IsNotEmpty({ message: 'pageSize不能为空' })
  pageSize: number = 10;
}
